package day07;

import java.util.Arrays;

public class txt10 {
    public static void main(String[] args) {
        int[] arr = {1, 2, 3, 4, 5};
        int[] rs=delete(arr, 2);
        System.out.println(Arrays.toString(rs));
    }


    static int[] delete(int[] arr, int index) {
        int a = arr[index];
        int b = arr[arr.length - 1];
        return Arrays.copyOf(arr, arr.length - 1);
    }

}

